package day9;

/**
 * @author oldliu
 * @since 1.0
 */
//u盘
public class USBStore extends Storage implements USB{
    private String name;
    private int cap;//容量，单位G

    public USBStore(String name, int cap) {
        this.name = name;
        this.cap = cap;
    }
    public void show(){
        System.out.println("这个是"+name+"的U盘，容量是"+cap+"G");
    }
//    public void readAndWrite(){
//        System.out.println("从u盘"+name+"上读写数据");
//    }
    @Override
    public void start() {
        System.out.println(name+"u盘接上了电脑，电脑显示多了1个分区，就是u盘的分区");
    }

    @Override
    public void stop() {
        System.out.println(name+"u盘从电脑上移除，分区消失");
    }
}
